<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Pragma" content="no-cache">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui" />
    <meta name="format-detection" content="telephone=no" />
    <title>车主个人中心</title>
    <meta content="" name="keywords" />
    <meta content="" name="description" />
    <meta content="" name="copyright" />
    <meta content="" name="author" />
    <meta name="robots" content="noarchive">
    <link rel="stylesheet" href="css/public.css" />
    <link rel="stylesheet" href="css/style.css">
</head>

<body class="bgf4">
    <!--主体区域-->
    <div class="pb120">
        <!-- <div class="pr">
        <div class="top-img">
            <img src="temp/mycenterimg.jpg" />        
        </div>
        <div class="tc pa mycenterimgpa">
            <p class="myCenter_headimg"><img src="temp/banner.jpg"></p>
            <p class="mt15 fz32 cfff">车主中心</p>
        </div>
    </div> -->
        <div class="bgfff pt20">
            <div class="unionbg">
                <div class="clear mt40">
                    <p class="fl union_photograph"><img src="temp/cardbgicon.png"></p>
                    <div class="fr unionbg_fr">
                        <p class="fz30 pt10">自驾车主卡</p>
                        <p class="">车主卡</p>
                    </div>
                </div>
                <p class="fz32 pt20 tc Cardnumber clear"><span id="cardNo">8888 8888 8888 8888</span></p>
                <p class="tr mt20"><a href="mydata.html" class="union_activation" id="tobuy">去购买</a></p>
                <!-- <p class="tr mt70"><a href="deactivation.html" class="union_activation">去激活</a></p>-->
                <!-- <p class="tr mt70"><a href="mydata.html" class="union_activation">去激活</a></p> -->
                <!-- <div class="mt70 clear">
                <p class="fl">卡号：<span>13354727</span></p>
                <p class="fr"><a href="mybuy.html" class="union_activation">去购买</a></p>
            </div>-->
            </div>
        </div>
        <div class="bgfff pt30">
            <a href="mydata.html" class="personallistbg pl20 bb">
                <dl class="clear">
                    <dt class="fl personallistimg"><img src="temp/mytravels.png" /></dt>
                    <dd class="fr personallisttext">完善资料</dd>
                </dl>
            </a>
            <a href="mytickettype.html" class="personallistbg pl20 bb">
                <dl class="clear">
                    <dt class="fl personallistimg"><img src="temp/mytravels.png" /></dt>
                    <dd class="fr personallisttext">票务信息</dd>
                </dl>
            </a>
            <a href="ordercar.html" class="personallistbg pl20 bb">
                <dl class="clear">
                    <dt class="fl personallistimg"><img src="temp/myorder.png" /></dt>
                    <dd class="fr personallisttext">我的订单</dd>
                </dl>
            </a>
            <!-- <a href="footprintcar.html" class="personallistbg pl20 bb">
            <dl class="clear">
                <dt class="fl personallistimg"><img src="temp/myknow.png" /></dt>
                <dd class="fr personallisttext">我的足迹</dd>
            </dl>
        </a> -->
        </div>
        <div class="bgfff mt30 tc pt20 pb20 cb7 fz28">退出登录</div>
    </div>

    <!--底部-->
    <div class="footerpage"></div>
    <!--//底部-->
</body>
<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
<script src="layer/layer.js"></script>
<script src="js/urlTool.js"></script>
<script src="js/common.js"></script>
<script>
    $(".footerpage").load("footer.html", '', function () {
        $('#myCenter').attr('href', 'myCenter.html').addClass("select-two").children().attr("class", "myCenterclick");
    });

    sm.req({
        url: "/sysUserCard/myCard",
        data: {
            noAlert: true
        },
        async: false,
        noAlert: true,
        done: function (res) {
            if (res.code == 200) {
                if (JSON.stringify(res.data) != "{}" && res.data != null && res.data != undefined && res.data != "" && JSON.stringify(res.data.userCar) != "{}" && JSON.stringify(res.data.userCard) != "{}") {
                    if (res.data.userCard.cardNo != undefined && res.data.userCard.cardNo != '') {
                        $("#cardNo").html(res.data.userCard.cardNo.replace(/\D/g, '').replace(/(\d{4})(?=\d)/g, "$1 "));
                    }
                    switch (parseInt(res.data.userCard.cardStatus)) {
                        case 0: //未激活
                            $(".unionbg").css('background', 'url(temp/cardbggrey.png) no-repeat center');
                            $("#tobuy").html('去激活');
                            break;
                        case 1: //已激活
                            $(".unionbg").css('background', 'url(temp/cardbg.png) no-repeat center');
                            $("#tobuy").html('去续期');
                            break;
                        case 2: //已过期
                            $("#tobuy").html('去续期');
                            break;

                        default:
                            break;
                    }
                }
            }
        }
    });
</script>

</html>